import Vue from 'vue'
import Router from 'vue-router'
import Login from "../views/Login";
import main from "../views/main";
import UserHetong from "../views/user/Hetong";
import Hello from "../views/Hello";
import Zhuangxiu from "../views/user/Zhuangxiu";
import Qita from "../views/user/Qita";
import Xiezilou from "../views/user/Xiezilou";
import Wuye from "../views/user/Wuye";
import Shuifei from "../views/user/Shuifei";
import Dianfei from "../views/user/Dianfei";
import Feiyong from "../views/user/Feiyong";
import Caiwu from "../views/user/Caiwu";
import Xiugai from "../views/Xiugai";
import dft from "../views/wys/dft";
import dzst from "../views/wys/dzst";
import sbxc from "../views/wys/sbxc";
import sft from "../views/wys/sft";
import szst from "../views/wys/szst";
import xzl from "../views/wys/xzl";
import yhyy from "../views/wys/yhyy";
import zz from "../views/wys/zz";
import vue1 from "../views/zy/vue1";
import vue2 from "../views/zy/vue2";
import vue3 from "../views/zy/vue3";
import vue4 from "../views/zy/vue4";
import vue5 from "../views/zy/vue5";
import vue6 from "../views/zy/vue6";
import vue7 from "../views/zy/vue7";
import vue8 from "../views/zy/vue8";
import vue9 from "../views/zy/vue9";
import sfy1 from "../views/sfy/vue1"
import sfy2 from "../views/sfy/vue2"
import sfy3 from "../views/sfy/vue3"
import sfy4 from "../views/sfy/vue4"
import sfy5 from "../views/sfy/vue5"
import sfy6 from "../views/sfy/vue6"
import sfy7 from "../views/sfy/vue7"
import sfy8 from "../views/sfy/vue8"
import sfy9 from "../views/sfy/vue9"
Vue.use(Router)
//解决同一个路由被多次添加
const VueRouterPush = Router.prototype.push
Router.prototype.push = function push (to) {
    return VueRouterPush.call(this, to).catch(err => err)
}
export default new Router({
    mode: 'history',
      routes: [

       {
        path:'/',
        name:'Login',
        component: Login
      },{
        path:'/main',
        name:'main',
        component: main,
        children:[{
            path: '/user/hetong',
            name: 'userHetong',
            component: UserHetong
        },
            {
                path: '/hello',
                name: 'hello',
                component: Hello
            },
            {
                path: '/user/zhuangxiu',
                name: 'zhuangxiu',
                component: Zhuangxiu
            },
            {
                path: '/user/qita',
                name: 'qita',
                component: Qita
            },
            {
                path: '/user/xiezilou',
                name: 'xiezilou',
                component: Xiezilou
            },
            {
                path: '/user/wuye',
                name: 'wuye',
                component: Wuye
            },
            {
                path: '/user/shuifei',
                name: 'shuifei',
                component: Shuifei
            },
            {
                path: '/user/dianfei',
                name: 'dianfei',
                component: Dianfei
            },
            {
                path: '/user/feiyong',
                name: 'feiyong',
                component: Feiyong
            },
            {
                path: '/user/caiwu',
                name: 'caiwu',
                component: Caiwu
            },
            {
                path: '/wys/dft',
                name: 'dft',
                component: dft
            },
            {
                path: '/wys/dzst',
                name: 'dzst',
                component: dzst
            },
            {
                path: '/wys/sbxc',
                name: 'sbxc',
                component: sbxc
            },
            {
                path: '/wys/sft',
                name: 'sft',
                component: sft
            },
            {
                path: '/wys/szst',
                name: 'szst',
                component: szst
            },
            {
                path: '/wys/xzl',
                name: 'xzl',
                component: xzl
            },
            {
                path: '/wys/yhyy',
                name: 'yhyy',
                component: yhyy
            },
            {
                path: '/wys/zz',
                name: 'zz',
                component: zz
            },{
                path: '/zy/vue1',
                name: 'vue1',
                component: vue1
            },{
                path: '/zy/vue2',
                name: 'vue2',
                component: vue2
            },{
                path: '/zy/vue3',
                name: 'vue3',
                component: vue3
            },{
                path: '/zy/vue4',
                name: 'vue4',
                component: vue4
            },{
                path: '/zy/vue5',
                name: 'vue5',
                component: vue5
            },{
                path: '/zy/vue6',
                name: 'vue6',
                component: vue6
            },{
                path: '/zy/vue7',
                name: 'vue7',
                component: vue7
            },{
                path: '/zy/vue8',
                name: 'vue8',
                component: vue8
            },{
                path: '/zy/vue9',
                name: 'vue9',
                component: vue9
            },{
                path: '/sfy/sfy1',
                name: 'sfy1',
                component: sfy1
            },{
                path: '/sfy/sfy2',
                name: 'sfy1',
                component: sfy2
            },{
                path: '/sfy/sfy3',
                name: 'sfy1',
                component: sfy3
            },{
                path: '/sfy/sfy4',
                name: 'sfy4',
                component: sfy4
            },{
                path: '/sfy/sfy5',
                name: 'sfy5',
                component: sfy5
            },{
                path: '/sfy/sfy6',
                name: 'sfy6',
                component: sfy6
            },{
                path: '/sfy/sfy7',
                name: 'sfy7',
                component: sfy7
            },{
                path: '/sfy/sfy8',
                name: 'sfy8',
                component: sfy8
            },{
                path: '/sfy/sfy9',
                name: 'sfy9',
                component: sfy9
            }
        ]
      },
          {
              path: '/Xiugai',
              name: 'Xiugai',
              component: Xiugai
          }
      ]

})
